//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved.

//namespace Components.CommerceEntities
//{
//    using System;
//    using System.Collections.Generic;
//    using System.Text;
//    using System.Runtime.Serialization;
//    using Microsoft.Commerce.Contracts;
//    using Microsoft.Samples.Commerce.Order.CommerceEntities;

//    /// <summary>
//    /// Represents the purchase order payment.
//    /// </summary>
//    public class PurchaseOrder : PaymentAccount
//    {
//        #region Constructors

//        /// <summary>
//        /// defines the model name for this commerce entity
//        /// </summary>
//        public new const string ModelNameDefinition = "PurchaseOrder";

//        /// <summary>
//        /// Initializes a new instance of the <see cref="CreditCard"/> class.
//        /// </summary>
//        public PurchaseOrder() : base(new CommerceEntity(PurchaseOrder.ModelNameDefinition))
//        {
//        }

//        public PurchaseOrder(CommerceEntity commerceEntity)
//            : base(commerceEntity)
//        {
//        }

//        #endregion

//        /// <summary>
//        /// Gets or sets the purchase order number used for this payment.
//        /// </summary>
//        /// <value>The purchase order number.</value>
//        public string PurchaseOrderNumber
//        {
//            get { return this._commerceEntity.GetPropertyValue(PropertyName.PurchaseOrderNumber) as string; }
//            set { this._commerceEntity.SetPropertyValue(PropertyName.PurchaseOrderNumber, value); }
//        }

//        /// <summary>
//        /// Names of the properties exposed by this commerce entity.
//        /// </summary>
//        [System.Diagnostics.CodeAnalysis.SuppressMessage("Components.CommerceEntities.Design", "CA1034:NestedTypesShouldNotBeVisible"), System.Diagnostics.CodeAnalysis.SuppressMessage("Components.CommerceEntities.Design", "CA1053:StaticHolderTypesShouldNotHaveConstructors", Justification = "Cannot make it private as it cannot be derived from")]
//        public new class PropertyName : PaymentAccount.PropertyName
//        {
//            /// <summary>
//            /// The name of the PurchaseOrderNumber property for a PurchaseOrder.
//            /// </summary>
//            public const string PurchaseOrderNumber = "PurchaseOrderNumber";
//        }

//        #region Implicit operators
//        /// <summary>
//        /// Toes the user profile.
//        /// </summary>
//        /// <param name="commerceEntity">The commerce entity.</param>
//        /// <returns></returns>
//        [System.Diagnostics.CodeAnalysis.SuppressMessage("Components.CommerceEntities.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates")]
//        public static implicit operator PurchaseOrder(CommerceEntity commerceEntity)
//        {
//            System.Diagnostics.Debug.Assert(PurchaseOrder.ModelNameDefinition.Equals(commerceEntity.ModelName));
//            return new PurchaseOrder(commerceEntity);
//        }
//        #endregion
//    }
//}
